import { configureStore } from '@reduxjs/toolkit'
import userReducer from './features/userSlice'
import moneyReducer from './features/moneySlice'
import { useDispatch } from 'react-redux'

const store = configureStore({
  reducer: {
    userInfo: userReducer,
    money: moneyReducer
  }
})
export type APPDispatch = typeof store.dispatch
export type RootSate = ReturnType<typeof store.getState>
export const useAPPDispatch = () => useDispatch<APPDispatch>()
export default store
